#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import filetype
import mimetypes

#import pandas as pd
#from sklearn import linear_model

base_dir = 'E:\pythonroot\demo'
path = r'E:\pythonroot\demo'
filenames = os.listdir(path)
for filename in filenames:

    pathFile = os.path.join(base_dir, filename)

    isFile = os.path.isfile(pathFile)
    if not isFile:
        continue

    print(pathFile)
    # kind = filetype.guess(pathFile)

    mime = mimetypes.guess_type(filename)
    #print("File name:" + filename + ": ")
    #print("    " + str(mime[0]) + "\n")
    print(mime)


    #if kind is None:
